DROP TABLE product;
CREATE TABLE product(
	p_id    NUMBER,
	p_name  VARCHAR2(40),
	p_ea    NUMBER,
	p_price VARCHAR2(20),
	p_corp_id  NUMBER,
	CONSTRAINT product_pk PRIMARY KEY(p_id),
	CONSTRAINT product_fk FOREIGN KEY(p_corp_id) REFERENCES corp(c_id)
);

DROP sequence product_seq;
CREATE sequence product_seq
START WITH 1 
increment BY 1;

insert into product values(product_seq.nextval, '상품1','100','100000', 1);
insert into product values(product_seq.nextval, '상품2','40','1000', 1);
insert into product values(product_seq.nextval, '상품3','700','10000', 1);
insert into product values(product_seq.nextval, '상품4','90','1000', 1);
insert into product values(product_seq.nextval, '상품5','420','100', 1);
insert into product values(product_seq.nextval, '상품6','97','10000', 1);
insert into product values(product_seq.nextval, '상품7','100','100000', 2);
insert into product values(product_seq.nextval, '상품8','40','1000', 2);
insert into product values(product_seq.nextval, '상품9','700','10000', 3);
insert into product values(product_seq.nextval, '상품10','90','1000', 3);
insert into product values(product_seq.nextval, '상품11','420','100', 3);
insert into product values(product_seq.nextval, '상품12','97','10000', 2);